package com.buddy.sds.auth.oauth2.token;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

public interface TokenManager {

    Token putToken(String username,String client_id,String token,String refresh_token,long tokenExpireTime,long refreshTokenExipreTime);

    Token getToken(String username,String client_id);

    boolean verifyToken(String token);

    boolean verifyRefreshToken(String refreshToken);

    String getUser(String token);

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    class Token{

        String token;
        String refresh_token;
        long expire_time;
    }
}
